export const getSystemInfo = (callback) =>{
  uni.getSystemInfo({//获取系统信息
    success: res => {
      callback(res)
    },
    fail(err) {
      callback('err')
    }
  })
}
export const isAuth = ()=>{
	uni.getStorage({
		key: 'user_base',
		success: function (res) {
			if(!res.data.token){
				// uni.redirectTo({
				// 	url:'/pages/login/login?showback=false'
				// })
			}
		},
		fail(err){
			// uni.redirectTo({
			// 	url:'/pages/login/login?showback=false'
			// })
		}
	});
}

export const getUserInfo =() =>{
	const value = uni.getStorageSync('user_base');
	return value==undefined||value==null?null:value;
}